<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Jedrzej\Pimpable\PimpableTrait;

class WechatMedia extends Model
{
    use HasFactory;
    use PimpableTrait;
    use SoftDeletes;
    /**
     * 默认排序
     */
    protected $defaultSortCriteria = ['id,desc'];

    /**
     * 可排序字段
     */
    public $sortable = [
        'created_at',
        'id',
    ];

    /**
     * 可搜索字段
     */
    public $searchable = [
        'type',
        'path',
        'media_id',
        'url',
        'temporary',
        'content',
        'key_id',
    ];
    /**
     * 微信回复表可批量赋值字段
     */
    protected $fillable = [
        'type',
        'path',
        'content',
        'media_id',
        'url',
        'temporary',
        'key_id',
    ];

}
